﻿@model Dictionary<string, int>
@section css
    {
    <link href="~/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
}
<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title">统计日期</h3>
    </div>
    <div class="box-body">
        <form class="form-inline" id="CheckForm" asp-action="StatisticsPlace" method="post">
            <div class="form-group">
                <label>开始日期</label>
                <input type="text" class="form-control search-time" name="beginDate" />
            </div>
            <div class="form-group">
                <label>结束日期</label>
                <input type="text" class="form-control search-time" name="endDate" />
            </div>
            <button type="submit" id="btnSearch" class="btn btn-primary">开始统计</button>
        </form>
    </div>
</div>
<div class="box box-warning">
    <div class="box-header with-border">
        <h3 class="box-title">统计结果</h3>
    </div>
    <div class="box-body">
        <table class="table table-bordered">
            @{
                var allCount = 0;
                foreach (var dic in Model)
                {
                    if (dic.Key == "总数")
                    {
                        allCount = dic.Value;
                        continue;
                    }
                    <tr>
                        <td>@dic.Key</td>
                        <td>@dic.Value</td>
                    </tr>

                }
            }
            <tr>
                <td>总数</td>
                <td>@allCount</td>
            </tr>

        </table>
    </div>
</div>
<div class="modal fade" id="LoadingModal" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                信件统计涉及到的数据量较大，维度较多，请耐心等待...
            </div>

        </div>
    </div>
</div>
@section scripts
    {
    <script src="~/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script src="~/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script src="~/views-resource/letter/statistics.js"></script>
}